package com.example.springboot159.springboot.chapter02;

public class Test {
    public static void main(String[] args) {
        BeanDefinition definition = new BeanDefinition(new UserService());

        BeanFactory beanFactory = new BeanFactory();

        beanFactory.registerBeanDefinition("userService",definition);

        UserService result = (UserService) beanFactory.getBean("userService");

        result.queryUserInfo();


    }
}
